package com.tmpt.controller.taglib.generic;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.BodyTagSupport;
import javax.servlet.jsp.tagext.Tag;

public class ColumnTag<T> extends BodyTagSupport{
	
	private String columnName;
	private String columnValue;

	
	public int doStartTag() throws javax.servlet.jsp.JspException {
		return super.doStartTag();
	}

	public int doEndTag() throws JspException {
		Tag tag = findAncestorWithClass(this, GenericTag.class);
		GenericTag genericTag = (GenericTag)tag;
		genericTag.put(columnName, columnValue);
		return super.doEndTag();
	}

	public void release() {
		super.release();
		id = null;
	}

	public String getColumnName() {
		return columnName;
	}

	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}

	public String getColumnValue() {
		return columnValue;
	}

	public void setColumnValue(String columnValue) {
		this.columnValue = columnValue;
	}

	
	
}
